package com.example.demo.entity;

import javax.validation.constraints.Max;
import javax.validation.constraints.NotNull;

public class User {

	@NotNull(message="用户名不能为空")
	private String name;
	@Max(value=34,message="年龄不能超过34岁")
	private Integer age;
	private Character sex;
	private UserInfo info;
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Integer getAge() {
		return age;
	}
	public void setAge(Integer age) {
		this.age = age;
	}
	public Character getSex() {
		return sex;
	}
	public void setSex(Character sex) {
		this.sex = sex;
	}
	public UserInfo getInfo() {
		return info;
	}
	public void setInfo(UserInfo info) {
		this.info = info;
	}
	public User(String name, Integer age, Character sex, UserInfo info) {
		this.name = name;
		this.age = age;
		this.sex = sex;
		this.info = info;
	}
	public User() {
	}
	
	
}
